package com.ruoyi.project.module.api.service;

import com.ruoyi.project.module.common.dict.AppFeesetType;
import com.ruoyi.project.module.feeset.domain.Feeset;
import com.ruoyi.project.module.feeset.service.IFeesetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class ApiFeesetService {

    @Autowired
    private IFeesetService feesetService;

    public Map<String, Object> getFeeset() {
        Map<String, Object> result = new HashMap<>();

        Feeset feeset = new Feeset();
        feeset.setFeesetType(AppFeesetType.D_1_HY);
        List<Feeset> memberFeesetList = feesetService.selectFeesetList(feeset);
        result.put("member", memberFeesetList);

        feeset.setFeesetType(AppFeesetType.D_2_JF);
        List<Feeset> pointFeesetList = feesetService.selectFeesetList(feeset);
        result.put("point", pointFeesetList);

        return result;


    }

}
